/**
 * Created by TYC on 2016/3/20.
 */
import java.util.Scanner;

public class Fei1 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        System.out.printf("求几个费氏数？");
        int n=s.nextInt();
        int arr[] = new int[n];
        arr[0] =0;
        arr[1] = 1;
        for (int i = 2; i < arr.length; i++) {
            arr[i] = arr[i - 1] + arr[i - 2]; }
        System.out.printf("斐波那契数列的前%d项如下所示：",n);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]); }
    }
}
